package practice;

import poly.Pet;
import poly.RobotPet;

public class PetTesPrac {
    static void intro(Pet d){
        d.introduce();
    }

    public static void main(String[] args) {
        Pet[] a={
          new Pet("金毛","张淳柏",8),
          new RobotPet("ai","ali"),
          new Pet("柯基","阿旺",6),
        };
        for (int i = 0; i <a.length ; i++) {
            intro(a[i]);
            System.out.println();
        }

    }
}
